<?php
$yhendus=new mysqli("localhost", "if13", "ifikad", "if13_ulpst_p");
if(!empty($_REQUEST["kliendinimi"])){
$kask=$yhendus->prepare(
"INSERT INTO mikrobussivedu(kliendinimi, kontakt, kliendisoov) VALUE(?, ?, ?)");
$kask->bind_param("sss", $_REQUEST["kliendinimi"],
 $_REQUEST["kontakt"], $_REQUEST["kliendisoov"]);
$kask->execute();
echo $yhendus->error;
header("Location: $_SERVER[PHP_SELF]");
$yhendus->close();
exit();
}
?>
<!doctype html>
<html>
<head>
<title>Kliendi tellimus</title>
</head>
<body>
<h1>Sisestage enda soov.</h1>
<form action='?'>
<input type="hidden" name="uusleht" value="jah" />
<h2>Uue soovi lisamine</h2>
<dl>
<dt>Kliendi nimi:</dt>
<dd>
<input type="text" name="kliendinimi" />
</dd>
<dt>Kliendi kontakt:</dt>
<dd>
<input type="text" name="kontakt" />
</dd>
<dt>Kliendisoov:</dt>
<dd>
<textarea rows="20" name="kliendisoov"></textarea>
</dd>
</dl>
<input type="submit" value="sisesta">
</form>
</body>
</html>
<?php
$yhendus->close();
?>